package com.suray.wcs.service.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.suray.commin.core.utils.BaseModel;
import com.suray.wcs.service.pojo.RgvChargeInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wcs_scada")
public class ScadaDB extends BaseModel implements Serializable {

    @TableId(value = "scada_id", type = IdType.AUTO)
    private Integer scadaId;
    /**
     * 设备Id
     */
    private Integer rgvNo;

    private Integer carStatus;
    /**
     * 小车运行时间
     */
    private Integer runTime;
    /**
     * 行驶转速（r）
     */
    private Integer drivingSpeed;
    /**
     * 小车前方障碍物
     */
    private Integer obstacleAhead;
    /**
     * 行驶驱动电压
     */
    private Integer drivingVolt;
    /**
     * 行驶驱动电压
     */
    private Integer drivingCurr;
    /**
     * 行驶驱动电流
     */
    private Integer trayObstaDis;
    /**
     * 托盘障碍物激光雷达距离
     */
    private Integer suroundObstaDis;
    /**
     * 四周障碍物激光雷达距离
     */
    private Integer hydraulicSpeed;
    /**
     * 液压油温
     */
    private Integer hydraOilTemp;
    /**
     * 液压驱动电压
     */
    private Integer hydraDriveVolt;
    /**
     * 液压驱动电流
     */
    private Integer hydraDriveCurr;
    /**
     * 电池信息
     */
    @TableField(exist = false)
    private RgvChargeInfo rgvChargeInfo;
    /**
     * 行驶里程数
     */
    private Long travelDistance;
    /**
     * 行驶驱动器故障次数
     */
    private Integer travelDriveErrCount;
    /**
     * 行驶驱动器执行动作次数
     */
    private Integer travelDriveExecCount;
    /**
     * 托盘扫码器状态
     */
    private Integer pltCodeScannerStatus;
    /**
     * 换向、托盘动作执行总次数
     */
    private Long oilDriveExecCount;
    /**
     * 油泵驱动器故障次数
     */
    private Integer oilDriveErrCount;

    public ScadaDB(RgvChargeInfo rgvChargeInfo) {
        this.rgvChargeInfo = rgvChargeInfo;
    }
}
